<%--
  Created by IntelliJ IDEA.
  User: 杨麟
  Date: 2022/2/17
  Time: 17:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>天堂登记</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/bootstrap.css">
    <script src="${pageContext.request.contextPath}/static/js/jquery-3.4.1.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.js"></script>
    <style>
        img{
            /*表示显示手型*/
            cursor:pointer;
        }
    </style>
</head>
<body>
<div class="col-md-4">
    <h1>用户登录</h1>
    <form action="${pageContext.request.contextPath}/ServletMain?cmd=login" class="form-group" method="post">
        <table class="table table-bordered">
            <tr>
                <td>用户名</td>
                <td>
                    <input type="text" class="form-control" name="username" id="username">
                </td>
            </tr>
            <tr>
                <td>密码</td>
                <td>
                    <input type="password" class="form-control" name="userpwd" id="userpwd">
                </td>
            </tr>
            <tr>
                <td>验证码：</td>
                <td>

                    <div class="col-md-6">
                        <img src="${pageContext.request.contextPath}/checkcode" id = "image" onclick="F5()"><br>
                        <input type="text" class="form-control" name="codeText">
                    </div>
                    <span  style="color: red">${msg}</span>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="submit" class="btn btn-success" value="登录">
                </td>
            </tr>
        </table>
    </form>
    <br><br>
    小老板，还没注册？<a href="${pageContext.request.contextPath}/page/register.jsp">立即注册</a>

</div>

<script>
    function F5() {
        // console.log("123");
        var date = new Date();
        var img = document.getElementById("image");
        img.src = "${pageContext.request.contextPath}/checkcode?date="+date.getTime();
    }
</script>
</body>
</html>
